/*
 * @Description: 
 * @Author: zoe
 * @Date: 2024-09-02 16:22:04
 * @LastEditors: rendc
 * @LastEditTime: 2024-09-02 16:31:21
 */

import java.util.Scanner;

public class Test03{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个年份");
        int year = scanner.nextInt();
        System.out.println("请输入一个月份");
        int month = scanner.nextInt();
        switch(month){
            case 1: case 3: case 5: case 7: case 8: case 10: case 12:
            System.out.println("31天");
            break;
            case 4: case 6: case 9: case 11:
            System.out.println("30天");
            break;
            default:
            if((year % 4==0 & year % 100!=0)||year%400==0)
            System.out.println(year + "年" + month + "月有" + "29天");
            else
            System.out.println(year + "年" + month + "月有" + "28天");

        }


    }
}
